﻿// JScript 文件
function RGpsid( id,gpsid,title,description,type,pointType ){
	this.toString=function(){
		return 'RGpsid';
	}
	
	if(id){
		this.id=id;
	}else{
		this.id=-1;
	}
	if(gpsid){
		this.gpsid=gpsid;
	}else{
		this.gpsid='';
	}
	if(title){
		this.title=title;
	}else{
		this.title='';
	}
	if(description){
		this.description=description;
	}else{
		this.description='';
	}
	if(type){
		this.type=type;
	}else{
		this.type=1;
	}
	if(pointType){
		this.pointType=0;
	}
	
	this.getTypeDescription=function(){
		switch(this.type){
			case 0:
			case '0':
				return '未知';
			break;
			case 1:
			case '1':
				return '单一';
			break;
			case 2:
			case '2':
				return '连锁';
			break;
			default:
				return '未知';
			break;
		}
		return '未知';
	}
	
	this.getType=function(){
		switch(this.type){
			case 1:
			case '1':
				return '个人';
			break;
			case 2:
			case '2':
				return '企业';
			break;
			default:
				return '未知';
			break;
		}
		return '未知';
	}
	
	this.getPointTypeDescription=function(){
		switch(this.pointType){
			case 0:
			case '0':
				return '不指向';
			break;
			case 1:
			case '1':
				return '已认领企业';
			break;
			case 2:
			case '2':
				return '其它企业';
			break;
			case 3:
			case '3':
				return '已认领企业地址';
			break;
			case 4:
			case '4':
				return '其它企业';
			break;
			default:
				return '无指向';
			break;
		}
		return '无指向';
	}
	this.isNonEmptyPointer=function(){
		return this.pointType!=0&&this.pointType!='0';
	}
}
